package com.ygo.feihua;
import android.content.*;
import com.bumptech.glide.*;
import com.bumptech.glide.integration.okhttp.*;
import com.bumptech.glide.load.engine.cache.*;
import com.bumptech.glide.load.model.*;
import com.bumptech.glide.module.*;
import com.ygo.feihua.*;
import java.io.*;


public class GlideConfiguration implements GlideModule
{

	@Override
	public void registerComponents(Context p1, Glide p2, Registry p3)
	{
		p3.append(GlideUrl.class, InputStream.class,new OkHttpUrlLoader.Factory());
	
		
		
		// TODO: Implement this method
	}
	

    @Override
    public void applyOptions(Context context, GlideBuilder builder) {
        // 配置图片将缓存到SD卡
     /*   ExternalCacheDiskCacheFactory externalCacheDiskCacheFactory = new ExternalCacheDiskCacheFactory(context);
        builder.setDiskCache(externalCacheDiskCacheFactory);

		*/
	
		builder.setDiskCache(new DiskLruCacheFactory(Gongju.PATH_OURYGO+"image/hc",104857600));
		
        // 如果配置图片将缓存到SD卡后那么getPhotoCacheDir返回仍然没有变化
      //  Log.w("jayuchou", Glide.getPhotoCacheDir(context).getPath());
    }

   }
